import request from '@/utils/request'

// 创建导航栏信息
export function createNav(data) {
  return request({
    url: '/system/nav/create',
    method: 'post',
    data: data
  })
}

// 更新导航栏信息
export function updateNav(data) {
  return request({
    url: '/system/nav/update',
    method: 'put',
    data: data
  })
}

// 删除导航栏信息
export function deleteNav(id) {
  return request({
    url: '/system/nav/delete?id=' + id,
    method: 'delete'
  })
}

// 获得导航栏信息
export function getNav(id) {
  return request({
    url: '/system/nav/get?id=' + id,
    method: 'get'
  })
}

// 获得导航栏信息分页
export function getNavPage(params) {
  return request({
    url: '/system/nav/page',
    method: 'get',
    params
  })
}
// 导出导航栏信息 Excel
export function exportNavExcel(params) {
  return request({
    url: '/system/nav/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}